class Hippo::Command::NamedCommand

Attributes

class_name[R]
client_dir[R]
identifier[R]
namespace[R]
spec_dir[R]

Public Class Methods

source_root() click to toggle source
# File lib/hippo/command/named_command.rb, line 11
def self.source_root
    Pathname.new(__FILE__).dirname.join("..","..","..","templates")
end

Public Instance Methods

load_namespace() click to toggle source
# File lib/hippo/command/named_command.rb, line 15
def load_namespace
    @identifier = extension.identifier
    @namespace  = options[:namespace] || @identifier.underscore.camelize
end
set_variables() click to toggle source
# File lib/hippo/command/named_command.rb, line 20
def set_variables
    @class_name = name.underscore.camelize
    @spec_dir   = "spec/client"
    @client_dir = "client/#{identifier}"
end

Protected Instance Methods

extension() click to toggle source
# File lib/hippo/command/named_command.rb, line 28
def extension
    @extension ||= Command.load_current_extension(raise_on_fail:true)
end