Class: GeoPattern::Background
- Inherits:
-
Object
- Object
- GeoPattern::Background
- Extended by:
- Forwardable
- Includes:
- Roles::ComparableMetadata
- Defined in:
- lib/geo_pattern/background.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#generator ⇒ Object
readonly
Returns the value of attribute generator.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#preset ⇒ Object
readonly
Returns the value of attribute preset.
Instance Method Summary collapse
-
#initialize(options) ⇒ Background
constructor
A new instance of Background.
Methods included from Roles::ComparableMetadata
Constructor Details
#initialize(options) ⇒ Background
Returns a new instance of Background.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/geo_pattern/background.rb', line 13 def initialize() @image = [:image] @preset = [:preset] @color = [:color] @generator = [:generator] raise ArgumentError, "Argument color is missing" if @color.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
#color ⇒ Object (readonly)
Returns the value of attribute color.
9 10 11 |
# File 'lib/geo_pattern/background.rb', line 9 def color @color end |
#generator ⇒ Object (readonly)
Returns the value of attribute generator.
9 10 11 |
# File 'lib/geo_pattern/background.rb', line 9 def generator @generator end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
9 10 11 |
# File 'lib/geo_pattern/background.rb', line 9 def image @image end |
#preset ⇒ Object (readonly)
Returns the value of attribute preset.
9 10 11 |
# File 'lib/geo_pattern/background.rb', line 9 def preset @preset end |