Class: RubyLint::DefinitionBuilder::RubyHash
- Defined in:
- lib/ruby-lint/definition_builder/ruby_hash.rb
Overview
Definition builder for building Ruby hashes.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#build ⇒ RubyLint::Definition::RubyObject
Builds the definition for the Hash and assigns the members.
-
#container_type ⇒ Symbol
-
#parents ⇒ Object
Methods inherited from RubyArray
#create_container, #create_member, #values
Methods inherited from Base
Constructor Details
This class inherits a constructor from RubyLint::DefinitionBuilder::Base
Instance Method Details
#build ⇒ RubyLint::Definition::RubyObject
Builds the definition for the Hash and assigns the members.
12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby-lint/definition_builder/ruby_hash.rb', line 12 def build definition = create_container values.each do |pair| definition.add_definition(pair) end return definition end |
#container_type ⇒ Symbol
32 33 34 |
# File 'lib/ruby-lint/definition_builder/ruby_hash.rb', line 32 def container_type return :hash end |
#parents ⇒ Object
25 26 27 |
# File 'lib/ruby-lint/definition_builder/ruby_hash.rb', line 25 def parents return [vm.global_constant('Hash')] end |