mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9b52ae2e64
commit
287a34ae0d
856 changed files with 13989 additions and 13989 deletions
|
@ -12,13 +12,13 @@
|
|||
# OpenStruct allows you to create data objects and set arbitrary attributes.
|
||||
# For example:
|
||||
#
|
||||
# require 'ostruct'
|
||||
# require 'ostruct'
|
||||
#
|
||||
# record = OpenStruct.new
|
||||
# record.name = "John Smith"
|
||||
# record.age = 70
|
||||
# record.pension = 300
|
||||
#
|
||||
#
|
||||
# puts record.name # -> "John Smith"
|
||||
# puts record.address # -> nil
|
||||
#
|
||||
|
@ -41,7 +41,7 @@ class OpenStruct
|
|||
#
|
||||
# p data # -> <OpenStruct country="Australia" population=20000000>
|
||||
#
|
||||
# By default, the resulting OpenStruct object will have no attributes.
|
||||
# By default, the resulting OpenStruct object will have no attributes.
|
||||
#
|
||||
def initialize(hash=nil)
|
||||
@table = {}
|
||||
|
@ -53,7 +53,7 @@ class OpenStruct
|
|||
end
|
||||
end
|
||||
|
||||
# Duplicate an OpenStruct object members.
|
||||
# Duplicate an OpenStruct object members.
|
||||
def initialize_copy(orig)
|
||||
super
|
||||
@table = @table.dup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue