Class: Shokkenki::Consumer::Model::Fixture
- Inherits:
-
Object
- Object
- Shokkenki::Consumer::Model::Fixture
- Defined in:
- lib/shokkenki/consumer/model/fixture.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Fixture
constructor
A new instance of Fixture.
- #to_hash ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Fixture
8 9 10 11 |
# File 'lib/shokkenki/consumer/model/fixture.rb', line 8 def initialize attributes @name = attributes[:name] @arguments = attributes[:arguments] end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
6 7 8 |
# File 'lib/shokkenki/consumer/model/fixture.rb', line 6 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/shokkenki/consumer/model/fixture.rb', line 6 def name @name end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 |
# File 'lib/shokkenki/consumer/model/fixture.rb', line 13 def to_hash hash = {:name => @name} hash.merge!(:arguments => @arguments) if @arguments hash end |