Class: Diecut::Configurable

Inherits:
Object
  • Object
show all
Extended by:
ClassMethods
Includes:
Calibrate::Configurable
Defined in:
lib/diecut/configurable.rb

Direct Known Subclasses

UIConfig

Defined Under Namespace

Modules: ClassMethods Classes: InstanceSegment, PathSegment

Instance Attribute Summary

Attributes included from ClassMethods

#target_name

Instance Method Summary collapse

Methods included from ClassMethods

absorb_context, build_setting, build_subclass, classname, deep_field_names, inspect

Instance Method Details

#walk_path(field_path) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
# File 'lib/diecut/configurable.rb', line 99

def walk_path(field_path)
  first, *rest = *field_path

  segment = InstanceSegment.new(self, first.to_sym)
  if rest.empty?
    [segment]
  else
    [segment] + segment.value.walk_path(rest)
  end

end