class RBS::Prototype::RB::Context
Attributes
in_def
[RW]
bool
module_function
[RW]
bool
singleton
[RW]
bool
Public Class Methods
Public Instance Methods
() → (:singleton | :instance)
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/rb.rb, line 25 def attribute_kind if singleton :singleton else :instance end end
(Namespace) → Context
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/rb.rb, line 33 def enter_namespace(namespace) Context.initial(namespace: self.namespace + namespace) end
() → method_kind
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/rb.rb, line 15 def method_kind if singleton :singleton elsif module_function :singleton_instance else :instance end end
(?module_function: bool, ?singleton: bool, ?in_def: bool) → Context
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/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