Class: Cut::Mapping
- Inherits:
-
Object
- Object
- Cut::Mapping
- Defined in:
- lib/cut/mapping.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Mapping
constructor
A new instance of Mapping.
- #selector ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Mapping
Returns a new instance of Mapping.
6 7 8 9 |
# File 'lib/cut/mapping.rb', line 6 def initialize(name, = {}) @name = name @selector = [:to] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/cut/mapping.rb', line 4 def name @name end |
Instance Method Details
#selector ⇒ Object
11 12 13 |
# File 'lib/cut/mapping.rb', line 11 def selector @selector ||= ".#{name}" end |