class LinodeCluster::Node
Node
class
Attributes
client[RW]
ip_address[RW]
Public Class Methods
new(obj, client)
click to toggle source
Calls superclass method
# File lib/linode_cluster/node.rb, line 6 def initialize(obj, client) super obj # pass obj to Delegator constructor, required @delegate_sd_obj = obj # store obj for future use @client = client end
Public Instance Methods
__getobj__()
click to toggle source
# File lib/linode_cluster/node.rb, line 12 def __getobj__ @delegate_sd_obj # return object we are delegating to, required end
__setobj__(obj)
click to toggle source
# File lib/linode_cluster/node.rb, line 16 def __setobj__(obj) @delegate_sd_obj = obj end
cost_per_month()
click to toggle source
# File lib/linode_cluster/node.rb, line 37 def cost_per_month plan.price end
name()
click to toggle source
# File lib/linode_cluster/node.rb, line 29 def name label end
plan()
click to toggle source
# File lib/linode_cluster/node.rb, line 33 def plan client.find_plan_by_id(planid) end
region()
click to toggle source
# File lib/linode_cluster/node.rb, line 20 def region client.find_datacenter_by_id(datacenterid).abbr end
size()
click to toggle source
# File lib/linode_cluster/node.rb, line 24 def size return nil if plan.nil? plan.ram end