Class: Spektr::Exp::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/spektr/exp/send.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ast) ⇒ Option

Returns a new instance of Option.



86
87
88
89
90
91
92
93
94
# File 'lib/spektr/exp/send.rb', line 86

def initialize(ast)
  @key = ast.children.first
  @name = ast.children.first.children.last
  @type = ast.type

  @value = ast.children.last
  @value_name = ast.children.last.children.last
  @value_type = ast.children.last.type
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



84
85
86
# File 'lib/spektr/exp/send.rb', line 84

def key
  @key
end

#nameObject

Returns the value of attribute name.



84
85
86
# File 'lib/spektr/exp/send.rb', line 84

def name
  @name
end

#typeObject

Returns the value of attribute type.



84
85
86
# File 'lib/spektr/exp/send.rb', line 84

def type
  @type
end

#valueObject

Returns the value of attribute value.



84
85
86
# File 'lib/spektr/exp/send.rb', line 84

def value
  @value
end

#value_nameObject

Returns the value of attribute value_name.



84
85
86
# File 'lib/spektr/exp/send.rb', line 84

def value_name
  @value_name
end

#value_typeObject

Returns the value of attribute value_type.



84
85
86
# File 'lib/spektr/exp/send.rb', line 84

def value_type
  @value_type
end