Module: Nova::Common::StarManagement::InstanceMethods

Included in:
Star
Defined in:
lib/nova/common/star_management.rb

Overview

Instance methods.

API:

  • public

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#remoteModule

The remote this star is using. Can be set locally, but uses the global remote by default.

Returns:

See Also:

API:

  • public



157
158
159
# File 'lib/nova/common/star_management.rb', line 157

def remote
  @remote || self.class.remote
end

Instance Method Details

#initialize(remote = nil) ⇒ Object

Checks for the correct platforms in initialization. If it’s not on the right platform, raises an error.

Raises:

  • if it’s not available on the platform.

API:

  • public



134
135
136
137
# File 'lib/nova/common/star_management.rb', line 134

def initialize(remote = nil)
  @remote = (remote || self.remote).new
  super(@remote)
end

#inspectString

Cleans up the inspect a little bit.

Returns:

API:

  • public



142
143
144
145
146
147
148
149
# File 'lib/nova/common/star_management.rb', line 142

def inspect
  @_inspect ||= begin
    "#<" <<
      self.class.inspect <<
      (":0x%014x" % object_id) <<
    ">"
  end
end