Class: Hippo::Command::NamedCommand
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Hippo::Command::NamedCommand
- Includes:
- Thor::Actions
- Defined in:
- lib/hippo/command/named_command.rb
Direct Known Subclasses
App, GenerateMigration, GenerateModel, GenerateScreen, UpdateModel
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#client_dir ⇒ Object
readonly
Returns the value of attribute client_dir.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#spec_dir ⇒ Object
readonly
Returns the value of attribute spec_dir.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
9 10 11 |
# File 'lib/hippo/command/named_command.rb', line 9 def class_name @class_name end |
#client_dir ⇒ Object (readonly)
Returns the value of attribute client_dir.
9 10 11 |
# File 'lib/hippo/command/named_command.rb', line 9 def client_dir @client_dir end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
9 10 11 |
# File 'lib/hippo/command/named_command.rb', line 9 def identifier @identifier end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
9 10 11 |
# File 'lib/hippo/command/named_command.rb', line 9 def namespace @namespace end |
#spec_dir ⇒ Object (readonly)
Returns the value of attribute spec_dir.
9 10 11 |
# File 'lib/hippo/command/named_command.rb', line 9 def spec_dir @spec_dir end |
Class Method Details
.source_root ⇒ Object
11 12 13 |
# File 'lib/hippo/command/named_command.rb', line 11 def self.source_root Pathname.new(__FILE__).dirname.join("..","..","..","templates") end |
Instance Method Details
#load_namespace ⇒ Object
15 16 17 18 |
# File 'lib/hippo/command/named_command.rb', line 15 def load_namespace @identifier = extension.identifier @namespace = [:namespace] || @identifier.underscore.camelize end |
#set_variables ⇒ Object
20 21 22 23 24 |
# 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 |