Class: STDDAPI::Objects::Scenario

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feature_id, name, element_type, keyword) ⇒ Scenario

Returns a new instance of Scenario.



112
113
114
115
116
117
118
119
# File 'lib/objects.rb', line 112

def initialize(feature_id, name,element_type,keyword)
  @feature_id = feature_id
  @name = name
  @element_type = element_type
  @keyword = keyword
  @tags = []
  @steps = []
end

Instance Attribute Details

#element_typeObject

Returns the value of attribute element_type.



120
121
122
# File 'lib/objects.rb', line 120

def element_type
  @element_type
end

#feature_idObject

Returns the value of attribute feature_id.



120
121
122
# File 'lib/objects.rb', line 120

def feature_id
  @feature_id
end

#idObject

Returns the value of attribute id.



120
121
122
# File 'lib/objects.rb', line 120

def id
  @id
end

#keywordObject

Returns the value of attribute keyword.



120
121
122
# File 'lib/objects.rb', line 120

def keyword
  @keyword
end

#nameObject

Returns the value of attribute name.



120
121
122
# File 'lib/objects.rb', line 120

def name
  @name
end

#stepsObject

Returns the value of attribute steps.



120
121
122
# File 'lib/objects.rb', line 120

def steps
  @steps
end

#tagsObject

Returns the value of attribute tags.



120
121
122
# File 'lib/objects.rb', line 120

def tags
  @tags
end

Instance Method Details

#to_jsonObject



121
122
123
124
125
126
127
128
129
# File 'lib/objects.rb', line 121

def to_json
  {'feature_id' => @feature_id,
    'keyword' => @keyword,
    'name' => @name,
    'tags' => @tags,
    'element_type' => @element_type,
    'steps'=>@steps
   }.to_json
end