Class: Yoda::Parsing::TypeParser::Generator::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/yoda/parsing/type_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, type, keyword = nil) ⇒ Param



132
133
134
135
136
# File 'lib/yoda/parsing/type_parser.rb', line 132

def initialize(kind, type, keyword = nil)
  @kind = kind
  @keyword = keyword
  @type = type
end

Instance Attribute Details

#keyword ⇒ Object (readonly)

Returns the value of attribute keyword.



131
132
133
# File 'lib/yoda/parsing/type_parser.rb', line 131

def keyword
  @keyword
end

#kind ⇒ Object (readonly)

Returns the value of attribute kind.



131
132
133
# File 'lib/yoda/parsing/type_parser.rb', line 131

def kind
  @kind
end

#type ⇒ Object (readonly)

Returns the value of attribute type.



131
132
133
# File 'lib/yoda/parsing/type_parser.rb', line 131

def type
  @type
end

Instance Method Details

#to_paramter ⇒ Object



138
139
140
# File 'lib/yoda/parsing/type_parser.rb', line 138

def to_paramter
  Model::TypeExpressions::FunctionType::Parameter.new(name: keyword, type: type)
end