Class: RBS::Prototype::RB::Context
- Inherits:
-
Struct
- Object
- Struct
- RBS::Prototype::RB::Context
- Defined in:
- lib/rbs/prototype/rb.rb
Instance Attribute Summary collapse
-
#in_def ⇒ Object
Returns the value of attribute in_def.
-
#module_function ⇒ Object
Returns the value of attribute module_function.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#singleton ⇒ Object
Returns the value of attribute singleton.
Class Method Summary collapse
Instance Method Summary collapse
- #attribute_kind ⇒ Object
- #enter_namespace(namespace) ⇒ Object
- #method_kind ⇒ Object
- #update(module_function: self.module_function, singleton: self.singleton, in_def: self.in_def) ⇒ Object
Instance Attribute Details
#in_def ⇒ Object
Returns the value of attribute in_def
8 9 10 |
# File 'lib/rbs/prototype/rb.rb', line 8 def in_def @in_def end |
#module_function ⇒ Object
Returns the value of attribute module_function
8 9 10 |
# File 'lib/rbs/prototype/rb.rb', line 8 def module_function @module_function end |
#namespace ⇒ Object
Returns the value of attribute namespace
8 9 10 |
# File 'lib/rbs/prototype/rb.rb', line 8 def namespace @namespace end |
#singleton ⇒ Object
Returns the value of attribute singleton
8 9 10 |
# File 'lib/rbs/prototype/rb.rb', line 8 def singleton @singleton end |
Class Method Details
Instance Method Details
#attribute_kind ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/rbs/prototype/rb.rb', line 25 def attribute_kind if singleton :singleton else :instance end end |
#enter_namespace(namespace) ⇒ Object
33 34 35 |
# File 'lib/rbs/prototype/rb.rb', line 33 def enter_namespace(namespace) Context.initial(namespace: self.namespace + namespace) end |
#method_kind ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/rbs/prototype/rb.rb', line 15 def method_kind if singleton :singleton elsif module_function :singleton_instance else :instance end end |
#update(module_function: self.module_function, singleton: self.singleton, in_def: self.in_def) ⇒ Object
37 38 39 |
# File 'lib/rbs/prototype/rb.rb', line 37 def update(module_function: self.module_function, singleton: self.singleton, in_def: self.in_def) Context.new(module_function: module_function, singleton: singleton, namespace: namespace, in_def: in_def) end |