Class: GeoPattern::Structure

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Roles::ComparableMetadata
Defined in:
lib/geo_pattern/structure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Roles::ComparableMetadata

#generator?, included

Constructor Details

#initialize(options) ⇒ Structure

Returns a new instance of Structure

Raises:

  • (ArgumentError)

11
12
13
14
15
16
17
18
19
20
21
# File 'lib/geo_pattern/structure.rb', line 11

def initialize(options)
  @image     = options[:image]
  @preset    = options[:preset]
  @name      = options[:name]
  @generator = options[:generator]

  raise ArgumentError, 'Argument name is missing' if @name.nil?
  raise ArgumentError, 'Argument image is missing' if @image.nil?
  raise ArgumentError, 'Argument preset is missing' if @preset.nil?
  raise ArgumentError, 'Argument generator is missing' if @generator.nil?
end

Instance Attribute Details

#generatorObject (readonly)

Returns the value of attribute generator


7
8
9
# File 'lib/geo_pattern/structure.rb', line 7

def generator
  @generator
end

#imageObject (readonly)

Returns the value of attribute image


7
8
9
# File 'lib/geo_pattern/structure.rb', line 7

def image
  @image
end

#nameObject (readonly)

Returns the value of attribute name


7
8
9
# File 'lib/geo_pattern/structure.rb', line 7

def name
  @name
end

#presetObject (readonly)

Returns the value of attribute preset


7
8
9
# File 'lib/geo_pattern/structure.rb', line 7

def preset
  @preset
end