Class: RBS::Prototype::Runtime::ValueObjectBase
- Inherits:
-
Object
- Object
- RBS::Prototype::Runtime::ValueObjectBase
- Includes:
- Helpers
- Defined in:
- lib/rbs/prototype/runtime/value_object_generator.rb
Direct Known Subclasses
Instance Method Summary collapse
- #build_decl ⇒ Object
-
#initialize(target_class) ⇒ ValueObjectBase
constructor
A new instance of ValueObjectBase.
Constructor Details
#initialize(target_class) ⇒ ValueObjectBase
Returns a new instance of ValueObjectBase.
11 12 13 |
# File 'lib/rbs/prototype/runtime/value_object_generator.rb', line 11 def initialize(target_class) @target_class = target_class end |
Instance Method Details
#build_decl ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rbs/prototype/runtime/value_object_generator.rb', line 15 def build_decl decl = AST::Declarations::Class.new( name: to_type_name(only_name(@target_class)), type_params: [], super_class: build_super_class, members: [], annotations: [], location: nil, comment: nil ) add_decl_members(decl) decl end |