Class: Cry::Codegen::Interface
- Inherits:
-
Object
- Object
- Cry::Codegen::Interface
- Defined in:
- lib/cry/codegen/interface.rb
Defined Under Namespace
Classes: Type
Instance Attribute Summary collapse
-
#crystal_arg_types ⇒ Object
readonly
Returns the value of attribute crystal_arg_types.
-
#crystal_ret_type ⇒ Object
readonly
Returns the value of attribute crystal_ret_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, crystal_arg_types, crystal_ret_type) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(name, crystal_arg_types, crystal_ret_type) ⇒ Interface
Returns a new instance of Interface.
61 62 63 64 65 |
# File 'lib/cry/codegen/interface.rb', line 61 def initialize(name, crystal_arg_types, crystal_ret_type) @name = name @crystal_arg_types = crystal_arg_types.map { |t| Type.new(t) } @crystal_ret_type = Type.new(crystal_ret_type) end |
Instance Attribute Details
#crystal_arg_types ⇒ Object (readonly)
Returns the value of attribute crystal_arg_types.
59 60 61 |
# File 'lib/cry/codegen/interface.rb', line 59 def crystal_arg_types @crystal_arg_types end |
#crystal_ret_type ⇒ Object (readonly)
Returns the value of attribute crystal_ret_type.
59 60 61 |
# File 'lib/cry/codegen/interface.rb', line 59 def crystal_ret_type @crystal_ret_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
59 60 61 |
# File 'lib/cry/codegen/interface.rb', line 59 def name @name end |