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_pathObject



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

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

#belongs_to_associationsObject (readonly)

Returns the value of attribute belongs_to_associations.



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

def belongs_to_associations
  @belongs_to_associations
end

#belongs_to_polymorphic_associationsObject (readonly)

Returns the value of attribute belongs_to_polymorphic_associations.



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

def belongs_to_polymorphic_associations
  @belongs_to_polymorphic_associations
end

#clientObject

Returns the value of attribute client.



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

def client
  @client
end

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end

#nested_resourcesObject (readonly)

Returns the value of attribute nested_resources.



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

def nested_resources
  @nested_resources
end

#transformerObject



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

def transformer
  @transformer || ::Protip.default_transformer
end