Class: GoldenRose::SubtestItem

Inherits:
Object
  • Object
show all
Defined in:
lib/golden_rose/subtest_item.rb

Direct Known Subclasses

ChildItem, ParentItem

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_subtest) ⇒ SubtestItem

Returns a new instance of SubtestItem.



7
8
9
# File 'lib/golden_rose/subtest_item.rb', line 7

def initialize(source_subtest)
  @name = source_subtest["TestName"]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/golden_rose/subtest_item.rb', line 5

def name
  @name
end

Instance Method Details

#to_hObject



11
12
13
14
15
# File 'lib/golden_rose/subtest_item.rb', line 11

def to_h
  hashable_attributes.each_with_object({}) do |field, hash|
    hash[field] = public_send(field) if public_send(field)
  end
end