module Officepod::Helper

Public Instance Methods

body_empty?() click to toggle source
# File lib/officepod/helper.rb, line 26
def body_empty?
  @options[:body].empty?
end
command_empty?() click to toggle source
# File lib/officepod/helper.rb, line 22
def command_empty?
  @command.empty?
end
unsupported_command?() click to toggle source
# File lib/officepod/helper.rb, line 18
def unsupported_command?
  !(self.class.instance_methods.include?(@command.to_sym))
end
validates_body() click to toggle source
# File lib/officepod/helper.rb, line 14
def validates_body
  raise Officepod::Exception::EmptyBody.new if body_empty?
end
validates_command() click to toggle source
# File lib/officepod/helper.rb, line 4
def validates_command
  if command_empty?
     raise Officepod::Exception::EmptyCommand.new
  else
    if unsupported_command?
      raise Officepod::Exception::UnsupportedCommand.new(@command)
    end
  end
end