Class: SparkleFormation::Resources::Resource

Inherits:
Struct
  • Object
show all
Defined in:
lib/sparkle_formation/resources.rb

Overview

Defines a resource type

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name



27
28
29
# File 'lib/sparkle_formation/resources.rb', line 27

def name
  @name
end

#propertiesObject

Returns the value of attribute properties



27
28
29
# File 'lib/sparkle_formation/resources.rb', line 27

def properties
  @properties
end

#rawObject

Returns the value of attribute raw



27
28
29
# File 'lib/sparkle_formation/resources.rb', line 27

def raw
  @raw
end

Instance Method Details

#property(name) ⇒ Property, NilClass

Get property by name



32
33
34
35
36
# File 'lib/sparkle_formation/resources.rb', line 32

def property(name)
  properties.detect do |prop|
    prop.name == name
  end
end