Class: Panda::Profile

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

Constant Summary

Constants included from Router

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, #update_attributes!

Methods inherited from Resource

#cloud, cloud, #initialize, method_missing, #reload

Methods included from CloudConnection

#connection

Methods included from Associations

included

Methods included from Destroyers

#delete, included

Methods inherited from Base

#changed?, #id, #id=, #initialize, #inspect, #new?, #reload, sti_name, #to_json

Methods included from Finders

included

Methods included from Builders

#create, #create!, included

Methods included from Router

included, #replace_pattern_with_self_variables

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