Class: Hiptest::Nodes::Item
Direct Known Subclasses
Instance Attribute Summary collapse
-
#non_valued_parameters ⇒ Object
readonly
Returns the value of attribute non_valued_parameters.
-
#valued_parameters ⇒ Object
readonly
Returns the value of attribute valued_parameters.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Attributes inherited from Node
Instance Method Summary collapse
- #declared_variables_names ⇒ Object
-
#initialize(name, tags = [], parameters = [], body = []) ⇒ Item
constructor
A new instance of Item.
Methods inherited from Node
#==, #each_direct_children, #each_sub_nodes, #kind, #pretty_print_instance_variables, #project, #render
Constructor Details
#initialize(name, tags = [], parameters = [], body = []) ⇒ Item
Returns a new instance of Item.
240 241 242 243 244 245 246 247 248 |
# File 'lib/hiptest-publisher/nodes.rb', line 240 def initialize(name, = [], parameters = [], body = []) super() @children = { :name => name, :tags => , :parameters => parameters, :body => body } end |
Instance Attribute Details
#non_valued_parameters ⇒ Object (readonly)
Returns the value of attribute non_valued_parameters.
238 239 240 |
# File 'lib/hiptest-publisher/nodes.rb', line 238 def non_valued_parameters @non_valued_parameters end |
#valued_parameters ⇒ Object (readonly)
Returns the value of attribute valued_parameters.
238 239 240 |
# File 'lib/hiptest-publisher/nodes.rb', line 238 def valued_parameters @valued_parameters end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
238 239 240 |
# File 'lib/hiptest-publisher/nodes.rb', line 238 def variables @variables end |
Instance Method Details
#declared_variables_names ⇒ Object
250 251 252 253 254 255 256 |
# File 'lib/hiptest-publisher/nodes.rb', line 250 def declared_variables_names p_names = children[:parameters].map {|p| p.children[:name]} each_sub_nodes(Hiptest::Nodes::Variable).map do |var| v_name = var.children[:name] p_names.include?(v_name) ? nil : v_name end.uniq.compact end |