Class: Shokkenki::Consumer::Model::Fixture

Inherits:
Object
  • Object
show all
Defined in:
lib/shokkenki/consumer/model/fixture.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argumentsObject (readonly)

Returns the value of attribute arguments.



6
7
8
# File 'lib/shokkenki/consumer/model/fixture.rb', line 6

def arguments
  @arguments
end

#nameObject (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_hashObject



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