Class: Solargraph::RbsMap::Conversions::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/solargraph/rbs_map/conversions.rb

Overview

A container for tracking the current context of the RBS conversion process, e.g., what visibility is declared for methods in the current scope

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(visibility = :public) ⇒ Context

Returns a new instance of Context.

Parameters:

  • visibility (Symbol) (defaults to: :public)


16
17
18
# File 'lib/solargraph/rbs_map/conversions.rb', line 16

def initialize visibility = :public
  @visibility = visibility
end

Instance Attribute Details

#visibilityObject (readonly)

Returns the value of attribute visibility.



13
14
15
# File 'lib/solargraph/rbs_map/conversions.rb', line 13

def visibility
  @visibility
end