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

Instance Attribute Details

#base_path ⇒ Object



71
72
73
74
75
76
77
# File 'lib/protip/resource.rb', line 71

def base_path
  if @base_path == nil
    raise(RuntimeError.new 'Base path not yet set')
  else
    @base_path.gsub(/\/$/, '')
  end
end

#belongs_to_associations ⇒ Object (readonly)

Returns the value of attribute belongs_to_associations.



67
68
69
# File 'lib/protip/resource.rb', line 67

def belongs_to_associations
  @belongs_to_associations
end

#belongs_to_polymorphic_associations ⇒ Object (readonly)

Returns the value of attribute belongs_to_polymorphic_associations.



67
68
69
# File 'lib/protip/resource.rb', line 67

def belongs_to_polymorphic_associations
  @belongs_to_polymorphic_associations
end

#client ⇒ Object

Returns the value of attribute client.



65
66
67
# File 'lib/protip/resource.rb', line 65

def client
  @client
end

#message ⇒ Object (readonly)

Returns the value of attribute message.



67
68
69
# File 'lib/protip/resource.rb', line 67

def message
  @message
end

#nested_resources ⇒ Object (readonly)

Returns the value of attribute nested_resources.



67
68
69
# File 'lib/protip/resource.rb', line 67

def nested_resources
  @nested_resources
end

#transformer ⇒ Object



79
80
81
# File 'lib/protip/resource.rb', line 79

def transformer
  defined?(@transformer) ? @transformer : ::Protip.default_transformer
end