Class: HasHelpers::FactoryScenario::Runner::Reference

Inherits:
Struct
  • Object
show all
Defined in:
lib/has_helpers/factory_scenario/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rawObject

Returns the value of attribute raw

Returns:

  • (Object)

    the current value of raw



13
14
15
# File 'lib/has_helpers/factory_scenario/runner.rb', line 13

def raw
  @raw
end

Instance Method Details

#alias_nameObject



18
19
20
# File 'lib/has_helpers/factory_scenario/runner.rb', line 18

def alias_name
  segments.first.to_sym
end

#attr_pathObject



22
23
24
# File 'lib/has_helpers/factory_scenario/runner.rb', line 22

def attr_path
  segments[1..] || []
end

#segmentsObject



14
15
16
# File 'lib/has_helpers/factory_scenario/runner.rb', line 14

def segments
  raw.to_s.sub(/\A@/, "").split(".")
end