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.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/geo_pattern/background.rb', line 11 def initialize() @image = [:image] @preset = [:preset] @color = [:color] @generator = [:generator] fail ArgumentError, 'Argument color is missing' if @color.nil? fail ArgumentError, 'Argument image is missing' if @image.nil? fail ArgumentError, 'Argument preset is missing' if @preset.nil? fail ArgumentError, 'Argument generator is missing' if @generator.nil? end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
7 8 9 |
# File 'lib/geo_pattern/background.rb', line 7 def color @color end |
#generator ⇒ Object (readonly)
Returns the value of attribute generator.
7 8 9 |
# File 'lib/geo_pattern/background.rb', line 7 def generator @generator end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
7 8 9 |
# File 'lib/geo_pattern/background.rb', line 7 def image @image end |
#preset ⇒ Object (readonly)
Returns the value of attribute preset.
7 8 9 |
# File 'lib/geo_pattern/background.rb', line 7 def preset @preset end |