Class: Travis::Yaml::Matrix::Entry

Inherits:
Nodes::Root show all
Defined in:
lib/travis/yaml/matrix.rb

Constant Summary

Constants included from Nodes::LanguageSpecific

Nodes::LanguageSpecific::LANGUAGE_SPECIFIC

Instance Attribute Summary collapse

Attributes inherited from Nodes::Mapping

#mapping

Attributes inherited from Nodes::Node

#partent

Instance Method Summary collapse

Methods inherited from Nodes::Root

#nested_warnings, #verify, #verify_os

Methods included from Nodes::LanguageSpecific

#verify_language

Methods inherited from Nodes::Mapping

#==, #[], #[]=, #accept_key?, aliases, auto_prefix, #deep_verify, define_map_accessor, drop_empty, #drop_empty?, #empty?, experimental, #include?, map, #mapped_key, mapping, #nested_warnings, prefix_scalar, prefix_sequence, #prepare, required, subnode_for, #subnode_for, #verify, #verify_empty, #verify_errors, #verify_experimental, #verify_required, #visit_key_value, #visit_mapping, #visit_pair

Methods inherited from Nodes::Node

#deep_verify, #error, #errors, #errors?, has_default?, #method_missing, #nested_warning, #nested_warnings, #prepare, #respond_to_missing?, #to_s, #verify, #verify_language, #visit_child, #visit_mapping, #visit_pair, #visit_scalar, #visit_sequence, #visit_unexpected, #warngings?, #warning, #warnings

Constructor Details

#initialize(root, matrix_attributes) ⇒ Entry

Returns a new instance of Entry.



15
16
17
18
19
20
21
22
# File 'lib/travis/yaml/matrix.rb', line 15

def initialize(root, matrix_attributes)
  super(root)

  @matrix_attributes = matrix_attributes
  @env               = Nodes::Env.new(self)
  inherited_env      = root.env.global if root.env
  @env.global        = [matrix_attributes[:env], *inherited_env].compact
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Travis::Yaml::Nodes::Node

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



13
14
15
# File 'lib/travis/yaml/matrix.rb', line 13

def env
  @env
end

#matrix_attributesObject (readonly)

Returns the value of attribute matrix_attributes.



13
14
15
# File 'lib/travis/yaml/matrix.rb', line 13

def matrix_attributes
  @matrix_attributes
end

Instance Method Details

#inspectObject



28
29
30
# File 'lib/travis/yaml/matrix.rb', line 28

def inspect
  "#<#{self.class}: #{matrix_attributes}>"
end