Class: Cuporter::Node::Types::Feature

Inherits:
NodeBase
  • Object
show all
Includes:
Cuporter::Node::Tagged
Defined in:
lib/cuporter/node/types.rb

Instance Attribute Summary

Attributes included from Cuporter::Node::Tagged

#filter

Instance Method Summary collapse

Methods included from Cuporter::Node::Tagged

#filter_child, #has_tags?, #tags

Instance Method Details

#<=>(other) ⇒ Object

sort on: file path, name, substring of name after any ‘:’



103
104
105
106
107
108
109
# File 'lib/cuporter/node/types.rb', line 103

def <=>(other)
  if other.respond_to?(:file_path)
    file_path <=> other.file_path
  else
    super(other)
  end
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


111
112
113
114
115
116
# File 'lib/cuporter/node/types.rb', line 111

def eql?(other)
  if other.respond_to? :file_path
    return false if file_path != other.file_path
  end
  super(other)
end

#file_nameObject



98
99
100
# File 'lib/cuporter/node/types.rb', line 98

def file_name
  file_path.split(/\//).last
end

#file_pathObject



94
95
96
# File 'lib/cuporter/node/types.rb', line 94

def file_path
  self["file_path"]
end

#scenario_outline_node(scenario_outline) ⇒ Object



90
91
92
# File 'lib/cuporter/node/types.rb', line 90

def scenario_outline_node(scenario_outline)
  at("scenario_outline[cuke_name='#{scenario_outline[:cuke_name]}']")
end