Class: Kumi::Core::RubyParser::BuildContext
- Inherits:
-
Object
- Object
- Kumi::Core::RubyParser::BuildContext
- Defined in:
- lib/kumi/core/ruby_parser/build_context.rb
Instance Attribute Summary collapse
-
#current_location ⇒ Object
Returns the value of attribute current_location.
-
#imported_names ⇒ Object
readonly
Returns the value of attribute imported_names.
-
#imports ⇒ Object
readonly
Returns the value of attribute imports.
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
-
#root_hints ⇒ Object
readonly
Returns the value of attribute root_hints.
-
#traits ⇒ Object
readonly
Returns the value of attribute traits.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize ⇒ BuildContext
constructor
A new instance of BuildContext.
- #input_block_defined? ⇒ Boolean
- #mark_input_block_defined! ⇒ Object
- #merge_root_hint(namespace, values) ⇒ Object
Constructor Details
#initialize ⇒ BuildContext
Returns a new instance of BuildContext.
10 11 12 13 14 15 16 17 18 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 10 def initialize @inputs = [] @values = [] @traits = [] @imports = [] @imported_names = Set.new @root_hints = {} @input_block_defined = false end |
Instance Attribute Details
#current_location ⇒ Object
Returns the value of attribute current_location.
8 9 10 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 8 def current_location @current_location end |
#imported_names ⇒ Object (readonly)
Returns the value of attribute imported_names.
7 8 9 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 7 def imported_names @imported_names end |
#imports ⇒ Object (readonly)
Returns the value of attribute imports.
7 8 9 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 7 def imports @imports end |
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
7 8 9 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 7 def inputs @inputs end |
#root_hints ⇒ Object (readonly)
Returns the value of attribute root_hints.
7 8 9 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 7 def root_hints @root_hints end |
#traits ⇒ Object (readonly)
Returns the value of attribute traits.
7 8 9 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 7 def traits @traits end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
7 8 9 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 7 def values @values end |
Instance Method Details
#input_block_defined? ⇒ Boolean
24 25 26 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 24 def input_block_defined? @input_block_defined end |
#mark_input_block_defined! ⇒ Object
28 29 30 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 28 def mark_input_block_defined! @input_block_defined = true end |
#merge_root_hint(namespace, values) ⇒ Object
20 21 22 |
# File 'lib/kumi/core/ruby_parser/build_context.rb', line 20 def merge_root_hint(namespace, values) @root_hints[namespace] = (@root_hints[namespace] || {}).merge(values) end |