Class: Acv2lrtemplate::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/acv2lrtemplate/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ Parser

Returns a new instance of Parser.



10
11
12
13
14
15
# File 'lib/acv2lrtemplate/parser.rb', line 10

def initialize(filename)
  raise Acv2lrtemplate::Errors::Validator::NoFileProvided if filename.blank?
  @acv_file = filename
  validate
  parse
end

Instance Attribute Details

#acv_fileObject (readonly)

Returns the value of attribute acv_file.



7
8
9
# File 'lib/acv2lrtemplate/parser.rb', line 7

def acv_file
  @acv_file
end

#curverObject (readonly)

Returns the value of attribute curver.



7
8
9
# File 'lib/acv2lrtemplate/parser.rb', line 7

def curver
  @curver
end

#curvesObject

Returns the value of attribute curves.



8
9
10
# File 'lib/acv2lrtemplate/parser.rb', line 8

def curves
  @curves
end

Instance Method Details

#parseObject



17
18
19
20
# File 'lib/acv2lrtemplate/parser.rb', line 17

def parse
  @curver = Curver.new(@acv_file)
  @curves = parse_channels
end