Class: Travis::Yaml::Nodes::Cache
- Defined in:
- lib/travis/yaml/nodes/cache.rb
Instance Attribute Summary
Attributes inherited from Mapping
Attributes inherited from Node
Instance Method Summary collapse
- #visit_child(visitor, value) ⇒ Object
- #visit_scalar(visitor, type, value, implicit = true) ⇒ Object
- #visit_sequence(visitor, value) ⇒ Object
Methods inherited from 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 Node
#decrypt, #decrypted?, #deep_verify, #dup, #encrypt, #encrypted?, #error, #errors, #errors?, has_default?, #initialize, #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_mapping, #visit_pair, #visit_unexpected, #warngings?, #warning, #warnings, #with_value
Constructor Details
This class inherits a constructor from Travis::Yaml::Nodes::Node
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Travis::Yaml::Nodes::Node
Instance Method Details
#visit_child(visitor, value) ⇒ Object
26 27 28 |
# File 'lib/travis/yaml/nodes/cache.rb', line 26 def visit_child(visitor, value) visit_scalar(visitor, :str, value) end |
#visit_scalar(visitor, type, value, implicit = true) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/travis/yaml/nodes/cache.rb', line 8 def visit_scalar(visitor, type, value, implicit = true) case type when :bool visit_key_value(visitor, :bundler, value) visit_key_value(visitor, :apt, value) visit_key_value(visitor, :cocoapods, value) when :str key = visitor.generate_key(self, value) self[key] = true else super end end |
#visit_sequence(visitor, value) ⇒ Object
22 23 24 |
# File 'lib/travis/yaml/nodes/cache.rb', line 22 def visit_sequence(visitor, value) visitor.apply_sequence(self, value) end |