Class: OffTheGrid::NamedResource

Inherits:
Object
  • Object
show all
Includes:
GridResource
Defined in:
lib/off_the_grid/named_resource.rb

Overview

A base class for all resources keyed off of a #name attribute

Direct Known Subclasses

AccessList, HostGroup, Project, User

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GridResource

#<=>, #delete, #extract_detail, list, #new?, #save, #validate_before_delete, #validate_before_save

Constructor Details

#initialize(name) ⇒ NamedResource

Returns a new instance of NamedResource.



8
9
10
# File 'lib/off_the_grid/named_resource.rb', line 8

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/off_the_grid/named_resource.rb', line 6

def name
  @name
end