Class: Reader::SymbolMatrix

Inherits:
Object
  • Object
show all
Defined in:
lib/reader/symbolmatrix.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#sourceObject

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