Module: Protip::Resource::ClassMethods
- Defined in:
- lib/protip/resource.rb
Constant Summary collapse
- VALID_ACTIONS =
%i(show index create update destroy)
Instance Attribute Summary collapse
- #base_path ⇒ Object
-
#client ⇒ Object
Returns the value of attribute client.
- #converter ⇒ Object
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#nested_resources ⇒ Object
readonly
Returns the value of attribute nested_resources.
Instance Attribute Details
#base_path ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/protip/resource.rb', line 65 def base_path if @base_path == nil raise(RuntimeError.new 'Base path not yet set') else @base_path.gsub(/\/$/, '') end end |
#client ⇒ Object
Returns the value of attribute client.
59 60 61 |
# File 'lib/protip/resource.rb', line 59 def client @client end |
#converter ⇒ Object
73 74 75 |
# File 'lib/protip/resource.rb', line 73 def converter @converter || (@_standard_converter ||= Protip::StandardConverter.new) end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
61 62 63 |
# File 'lib/protip/resource.rb', line 61 def @message end |
#nested_resources ⇒ Object (readonly)
Returns the value of attribute nested_resources.
61 62 63 |
# File 'lib/protip/resource.rb', line 61 def nested_resources @nested_resources end |