Class: Cut::Mapping

Inherits:
Object
  • Object
show all
Defined in:
lib/cut/mapping.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @name = name
  @selector = options[:to]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/cut/mapping.rb', line 4

def name
  @name
end

Instance Method Details

#selectorObject



11
12
13
# File 'lib/cut/mapping.rb', line 11

def selector
  @selector ||= ".#{name}"
end