Class: Reader::SymbolMatrix
- Inherits:
-
Object
- Object
- Reader::SymbolMatrix
- Defined in:
- lib/reader/symbolmatrix.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
- #file(path) ⇒ Object
-
#initialize(source) ⇒ SymbolMatrix
constructor
A new instance of SymbolMatrix.
- #serialization(data) ⇒ Object (also: #smas)
- #yaml(data) ⇒ Object
Constructor Details
#initialize(source) ⇒ SymbolMatrix
Returns a new instance of SymbolMatrix.
5 6 7 |
# File 'lib/reader/symbolmatrix.rb', line 5 def initialize source @source = source end |
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/reader/symbolmatrix.rb', line 3 def source @source end |
Instance Method Details
#file(path) ⇒ Object
9 10 11 |
# File 'lib/reader/symbolmatrix.rb', line 9 def file path @source.merge! YAML.load_file path end |
#serialization(data) ⇒ Object Also known as: smas
17 18 19 |
# File 'lib/reader/symbolmatrix.rb', line 17 def serialization data @source.merge! ::SymbolMatrix::Serialization.parse data end |
#yaml(data) ⇒ Object
13 14 15 |
# File 'lib/reader/symbolmatrix.rb', line 13 def yaml data @source.merge! YAML.load data end |