Class: Imforger
- Inherits:
-
Object
- Object
- Imforger
- Defined in:
- lib/imforger.rb,
ext/imforger/imforger.c
Defined Under Namespace
Classes: Exception
Constant Summary collapse
- VERSION =
'0.2.2'
Instance Attribute Summary collapse
-
#input_image ⇒ Object
Returns the value of attribute input_image.
-
#options ⇒ Object
Returns the value of attribute options.
-
#output_image ⇒ Object
Returns the value of attribute output_image.
Instance Method Summary collapse
-
#initialize(path) ⇒ Imforger
constructor
A new instance of Imforger.
- #to_file(output_path, opts = {}) ⇒ Object
Constructor Details
#initialize(path) ⇒ Imforger
Returns a new instance of Imforger.
10 11 12 13 14 15 16 |
# File 'lib/imforger.rb', line 10 def initialize(path) path = File.(path) raise(Imforger::Exception, "Input file not found!") unless File.exists?(path) @input_image = path = {} end |
Instance Attribute Details
#input_image ⇒ Object
Returns the value of attribute input_image.
6 7 8 |
# File 'lib/imforger.rb', line 6 def input_image @input_image end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/imforger.rb', line 6 def end |
#output_image ⇒ Object
Returns the value of attribute output_image.
6 7 8 |
# File 'lib/imforger.rb', line 6 def output_image @output_image end |
Instance Method Details
#to_file(output_path, opts = {}) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/imforger.rb', line 18 def to_file(output_path, opts = {}) .merge!(opts) check_format save_file(File.(output_path)) end |