Class: Vmaps::Mapping

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lhsObject

Returns the value of attribute lhs.



5
6
7
# File 'lib/vmaps/mapping.rb', line 5

def lhs
  @lhs
end

#modeObject

Returns the value of attribute mode.



5
6
7
# File 'lib/vmaps/mapping.rb', line 5

def mode
  @mode
end

#rhsObject

Returns the value of attribute rhs.



5
6
7
# File 'lib/vmaps/mapping.rb', line 5

def rhs
  @rhs
end

#set_fromObject

Returns the value of attribute set_from.



5
6
7
# File 'lib/vmaps/mapping.rb', line 5

def set_from
  @set_from
end

#specialObject

Returns the value of attribute special.



5
6
7
# File 'lib/vmaps/mapping.rb', line 5

def special
  @special
end

Instance Method Details

#to_json(wat) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/vmaps/mapping.rb', line 11

def to_json(wat)
  {
    mode: @mode,
    lhs:  @lhs,
    rhs:  @rhs,
    set_from: @set_from,
    special:  @special
  }.to_json
end

#to_sObject



7
8
9
# File 'lib/vmaps/mapping.rb', line 7

def to_s
  "#{@lhs}\n  #{@rhs}\n  #{@mode}\n  #{@set_from}\n\n"
end