Module: Skeptick

Includes:
Sugar::Composition::Helper, Sugar::Edges, Sugar::Geometry, Sugar::Resizing
Defined in:
lib/skeptick/core.rb,
lib/skeptick/chain.rb,
lib/skeptick/error.rb,
lib/skeptick/image.rb,
lib/skeptick/helper.rb,
lib/skeptick/command.rb,
lib/skeptick/convert.rb,
lib/skeptick/railtie.rb,
lib/skeptick/version.rb,
lib/skeptick/sugar/edges.rb,
lib/skeptick/sugar/drawing.rb,
lib/skeptick/sugar/geometry.rb,
lib/skeptick/sugar/resizing.rb,
lib/skeptick/sugar/debugging.rb,
lib/skeptick/sugar/formatting.rb,
lib/skeptick/chain/dsl_context.rb,
lib/skeptick/image/dsl_context.rb,
lib/skeptick/sugar/composition.rb,
lib/skeptick/convert/dsl_context.rb,
lib/skeptick/sugar/sequence_manipulation.rb

Defined Under Namespace

Modules: Helper, Sugar Classes: Chain, Command, Convert, Image, ImageMagickError, Railtie

Constant Summary collapse

VERSION =
'0.1.1'

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Sugar::Composition::Helper

#compose

Methods included from Sugar::Resizing

#resized_image

Methods included from Sugar::Geometry

#geometry

Methods included from Sugar::Edges

#rounded_corners_image, #torn_paper_image

Class Attribute Details

.cd_pathObject

Returns the value of attribute cd_path.



13
14
15
# File 'lib/skeptick/core.rb', line 13

def cd_path
  @cd_path
end

.debug_mode=(value) ⇒ Object (writeonly)

Sets the attribute debug_mode

Parameters:

  • value

    the value to set the attribute debug_mode to.



9
10
11
# File 'lib/skeptick/core.rb', line 9

def debug_mode=(value)
  @debug_mode = value
end

.logger=(value) ⇒ Object (writeonly)

Sets the attribute logger

Parameters:

  • value

    the value to set the attribute logger to.



9
10
11
# File 'lib/skeptick/core.rb', line 9

def logger=(value)
  @logger = value
end

.logger_method=(value) ⇒ Object (writeonly)

Sets the attribute logger_method

Parameters:

  • value

    the value to set the attribute logger_method to.



9
10
11
# File 'lib/skeptick/core.rb', line 9

def logger_method=(value)
  @logger_method = value
end

.timeoutObject

Returns the value of attribute timeout.



13
14
15
# File 'lib/skeptick/core.rb', line 13

def timeout
  @timeout
end

Class Method Details

.debug_mode?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/skeptick/core.rb', line 27

def debug_mode?
  @debug_mode
end

.log(message) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/skeptick/core.rb', line 15

def log(message)
  @logger ||= ::STDOUT

  @logger_method ||=
    if    @logger.respond_to?(:debug); :debug
    elsif @logger.respond_to?(:puts);  :puts
    else  :write
    end

  @logger.public_send(@logger_method, message)
end

Instance Method Details

#chain(*args, &blk) ⇒ Object



40
41
42
# File 'lib/skeptick/core.rb', line 40

def chain(*args, &blk)
  Skeptick::Chain.new(self, *args, &blk)
end

#convert(*args, &blk) ⇒ Object



32
33
34
# File 'lib/skeptick/core.rb', line 32

def convert(*args, &blk)
  Skeptick::Convert.new(self, *args, &blk)
end

#image(*args, &blk) ⇒ Object



36
37
38
# File 'lib/skeptick/core.rb', line 36

def image(*args, &blk)
  Skeptick::Image.new(self, *args, &blk)
end