Module: HammerCLI::Apipie::Resource
- Included in:
- Command
- Defined in:
- lib/hammer_cli/apipie/resource.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #action ⇒ Object
- #connection_options ⇒ Object
- #parent_command_resource ⇒ Object
- #resource ⇒ Object
- #resource_config ⇒ Object
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/hammer_cli/apipie/resource.rb', line 5 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#action ⇒ Object
13 14 15 |
# File 'lib/hammer_cli/apipie/resource.rb', line 13 def action self.class.action end |
#connection_options ⇒ Object
21 22 23 |
# File 'lib/hammer_cli/apipie/resource.rb', line 21 def self.class. end |
#parent_command_resource ⇒ Object
25 26 27 |
# File 'lib/hammer_cli/apipie/resource.rb', line 25 def parent_command_resource self.parent_command.class.respond_to?(:resource) && self.parent_command.class.resource end |
#resource ⇒ Object
9 10 11 |
# File 'lib/hammer_cli/apipie/resource.rb', line 9 def resource self.class.resource || parent_command_resource || nil end |
#resource_config ⇒ Object
17 18 19 |
# File 'lib/hammer_cli/apipie/resource.rb', line 17 def resource_config self.class.resource_config end |