module Blobsterix::Transformations::Impl
Public Class Methods
body=(obj)
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 35 def self.body=(obj) @body=obj end
body_()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 39 def self.body_ @body end
create_simple_trafo(name_, input, output, is_format_=false, &block)
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 3 def self.create_simple_trafo(name_, input, output, is_format_=false, &block) trafo = ::Class.new Blobsterix::Transformations::Transformation do def self.name=(obj) @name=obj end def self.name_ @name end def self.is_format=(obj) @is_format=obj end def self.is_format_ @is_format end def self.setTypes(input,output) @input= ::Blobsterix::AcceptType.new input @output= ::Blobsterix::AcceptType.new output end def self.input_type_ @input end def self.output_type_ @output end def self.body=(obj) @body=obj end def self.body_ @body end def initialize end def name self.class.name_ end def is_format? self.class.is_format_ end def input_type self.class.input_type_ end def output_type self.class.output_type_ end def transform(input_path, target_path, value) self.class.body_.call input_path, target_path, value end end trafo.setTypes(input, output) trafo.is_format=is_format_ trafo.body=block trafo.name=name_ ::Blobsterix::Transformations::Impl.const_set("#{name_.capitalize}Transformation", trafo) end
input_type_()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 27 def self.input_type_ @input end
is_format=(obj)
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 14 def self.is_format=(obj) @is_format=obj end
is_format_()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 18 def self.is_format_ @is_format end
name=(obj)
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 6 def self.name=(obj) @name=obj end
name_()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 10 def self.name_ @name end
new()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 43 def initialize end
output_type_()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 31 def self.output_type_ @output end
setTypes(input,output)
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 22 def self.setTypes(input,output) @input= ::Blobsterix::AcceptType.new input @output= ::Blobsterix::AcceptType.new output end
Public Instance Methods
input_type()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 54 def input_type self.class.input_type_ end
is_format?()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 50 def is_format? self.class.is_format_ end
name()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 46 def name self.class.name_ end
output_type()
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 58 def output_type self.class.output_type_ end
transform(input_path, target_path, value)
click to toggle source
# File lib/blobsterix/transformation/image_transformation.rb, line 62 def transform(input_path, target_path, value) self.class.body_.call input_path, target_path, value end