Class: Steam::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/steam/base.rb
Instance Method Summary
collapse
Instance Method Details
#attribute_names ⇒ Object
3
4
5
|
# File 'lib/steam/base.rb', line 3
def attribute_names
@attribute_names
end
|
#attributes ⇒ Object
7
8
9
10
11
|
# File 'lib/steam/base.rb', line 7
def attributes
attribute_names.inject({}) do |attributes, name|
attributes.merge name => instance_variable_get("@#{name}")
end
end
|
#inspect ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/steam/base.rb', line 13
def inspect
inspected_attributes = if @built_attributes
attributes.map do |key, value|
" #{key}=#{value.inspect}"
end.join
else
''
end
"#<#{self.class.name}:#{__id__}#{inspected_attributes}>"
end
|