Class: PSD::Resource::Section::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/psd/resources/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, resource) ⇒ Base

Returns a new instance of Base.



15
16
17
18
# File 'lib/psd/resources/base.rb', line 15

def initialize(file, resource)
  @file = file
  @resource = resource
end

Class Method Details

.name(name = nil) ⇒ Object



10
11
12
13
# File 'lib/psd/resources/base.rb', line 10

def self.name(name = nil)
  @name = name unless name.nil?
  @name
end

.resource_id(id = nil) ⇒ Object



5
6
7
8
# File 'lib/psd/resources/base.rb', line 5

def self.resource_id(id = nil)
  @resource_id = id unless id.nil?
  @resource_id
end

Instance Method Details

#nameObject



21
# File 'lib/psd/resources/base.rb', line 21

def name; self.class.name; end

#resource_idObject



20
# File 'lib/psd/resources/base.rb', line 20

def resource_id; self.class.resource_id; end