Class: Hamster::Vector
- Includes:
- NRSER::Ext::Tree
- Defined in:
- lib/nrser/gem_ext/hamster/vector.rb
Overview
Definitions
Direct Known Subclasses
Instance Method Summary collapse
- #as_json(options = nil) ⇒ Object
-
#to_mutable ⇒ Object
Instance Methods ========================================================================.
- #to_yaml(*args, &block) ⇒ Object
Methods included from NRSER::Ext::Tree
#each_branch, #leaves, #map_branches, #map_leaves, #map_tree
Instance Method Details
#as_json(options = nil) ⇒ Object
38 39 40 |
# File 'lib/nrser/gem_ext/hamster/vector.rb', line 38 def as_json = nil to_mutable.as_json end |
#to_mutable ⇒ Object
Instance Methods
31 32 33 34 35 |
# File 'lib/nrser/gem_ext/hamster/vector.rb', line 31 def to_mutable each_with_object( [] ) { |entry, array| array << Hamster.to_mutable( entry ) } end |
#to_yaml(*args, &block) ⇒ Object
43 44 45 |
# File 'lib/nrser/gem_ext/hamster/vector.rb', line 43 def to_yaml *args, &block to_mutable.to_yaml *args, &block end |