Class: Travis::Yaml::Matrix::Entry
- Inherits:
-
Nodes::Root
- Object
- Nodes::Node
- Nodes::Mapping
- Nodes::Root
- Travis::Yaml::Matrix::Entry
- Defined in:
- lib/travis/yaml/matrix.rb
Constant Summary
Constants inherited from Nodes::Root
Constants included from Nodes::LanguageSpecific
Nodes::LanguageSpecific::LANGUAGE_SPECIFIC
Instance Attribute Summary collapse
-
#matrix_attributes ⇒ Object
readonly
Returns the value of attribute matrix_attributes.
Attributes inherited from Nodes::Mapping
Attributes inherited from Nodes::Node
Instance Method Summary collapse
-
#initialize(root, matrix_attributes) ⇒ Entry
constructor
A new instance of Entry.
Methods inherited from Nodes::Root
#inspect, #nested_warnings, #to_matrix, #verify, #verify_os, #warn_on_feature
Methods included from Nodes::LanguageSpecific
Methods inherited from Nodes::Mapping
#==, #[], #[]=, #accept_key?, aliases, auto_prefix, #deep_verify, define_map_accessor, drop_empty, #drop_empty?, #each_scalar, #empty?, experimental, #include?, #inspect, 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, #with_value!
Methods inherited from Nodes::Node
#decrypt, #decrypted?, #deep_verify, #dup, #encrypt, #encrypted?, #error, #errors, #errors?, has_default?, #method_missing, #nested_warning, #nested_warnings, #prepare, #respond_to_missing?, #serialize, #to_json, #to_legacy_ruby, #to_ruby, #to_s, #to_yaml, #verify, #verify_language, #visit_child, #visit_mapping, #visit_pair, #visit_scalar, #visit_sequence, #visit_unexpected, #warngings?, #warning, #warnings, #with_value
Constructor Details
#initialize(root, matrix_attributes) ⇒ Entry
Returns a new instance of Entry.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/travis/yaml/matrix.rb', line 14 def initialize(root, matrix_attributes) @matrix_attributes = matrix_attributes normal_attributes = matrix_attributes.select { |key| key != :env } generated_root = root.with_value(normal_attributes) if matrix_attributes[:env] generated_root.env.global = Travis::Yaml::Nodes::Env::List.new(generated_root.env) generated_root.env.global.add_value! root.env.global if root.env.global generated_root.env.global.add_value! matrix_attributes[:env] generated_root.env.mapping.delete "matrix" end super(generated_root) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Travis::Yaml::Nodes::Node
Instance Attribute Details
#matrix_attributes ⇒ Object (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 |