Class: Ffprober::Chapter
- Inherits:
-
Object
- Object
- Ffprober::Chapter
- Defined in:
- lib/ffprober/chapter.rb
Instance Method Summary collapse
-
#initialize(object_attribute_hash) ⇒ Chapter
constructor
A new instance of Chapter.
Constructor Details
#initialize(object_attribute_hash) ⇒ Chapter
Returns a new instance of Chapter.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/ffprober/chapter.rb', line 3 def initialize(object_attribute_hash) object_attribute_hash.each do |key, value| instance_variable_set("@#{key}", value) unless self.class.method_defined?(key) self.class.send(:define_method, key) do instance_variable_get("@#{key}") end end end end |