Class: ImageSpec
- Inherits:
-
Object
- Object
- ImageSpec
- Defined in:
- lib/image_spec.rb
Defined Under Namespace
Modules: Parser
Constant Summary collapse
- Error =
Class.new(StandardError)
Instance Method Summary collapse
-
#initialize(file) ⇒ ImageSpec
constructor
A new instance of ImageSpec.
Constructor Details
#initialize(file) ⇒ ImageSpec
Returns a new instance of ImageSpec.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/image_spec.rb', line 6 def initialize(file) @attributes = Parser.parse(stream_for(file)) @attributes.each do |key, value| instance_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{key} @attributes[:#{key}] end RUBY end end |