class DissociatedIntrospection::MethodCall::Argument

Attributes

ast[R]

Public Class Methods

new(ast) click to toggle source
# File lib/dissociated_introspection/method_call.rb, line 53
def initialize(ast)
  @ast = ast
end

Public Instance Methods

to_h() click to toggle source
# File lib/dissociated_introspection/method_call.rb, line 70
def to_h
  { type: type, value: value }
end
type() click to toggle source
# File lib/dissociated_introspection/method_call.rb, line 57
def type
  ast.type
end
value() click to toggle source
# File lib/dissociated_introspection/method_call.rb, line 61
def value
  case type
  when :block
    Block.new(ast.children)
  else
    ast.children[0]
  end
end