Class: Panda::Profile

Inherits:
Resource show all
Includes:
Updatable
Defined in:
lib/panda/resources/profile.rb

Constant Summary

Constants included from Router

Router::DEFAULT_FORMAT, Router::VAR_PATTERN

Instance Attribute Summary

Attributes inherited from Base

#attributes, #errors

Instance Method Summary collapse

Methods included from Updatable

#save, #save!, #update, #update_attribute, #update_attributes

Methods inherited from Resource

#cloud, cloud, #create, #create!, #initialize, method_missing, #reload

Methods included from CloudConnection

#connection

Methods included from Finders::FindMany

#all, #find_by

Methods included from Associations

included

Methods included from Builders

included

Methods inherited from Base

#changed?, #delete, end_class_name, id, #id, #id=, #initialize, #new?, #reload, #to_json

Methods included from Router

included, #object_url_map

Constructor Details

This class inherits a constructor from Panda::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Panda::Base

Instance Method Details

#commandObject

override attributes command and preset_name to ovoid <method undefined> when profile is a preset or not



13
14
15
# File 'lib/panda/resources/profile.rb', line 13

def command
  @attributes['command']
end

#preset?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/panda/resources/profile.rb', line 7

def preset?
  !preset_name
end

#preset_nameObject



17
18
19
# File 'lib/panda/resources/profile.rb', line 17

def preset_name
  @attributes['preset_name']
end