Class: Voom::Presenters::DSL::Components::Image
- Includes:
- Mixins::Tooltips
- Defined in:
- lib/voom/presenters/dsl/components/image.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#image ⇒ Object
Returns the value of attribute image.
-
#position ⇒ Object
Returns the value of attribute position.
-
#selected ⇒ Object
Returns the value of attribute selected.
-
#url ⇒ Object
Returns the value of attribute url.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from EventBase
Attributes included from Mixins::Event
Attributes inherited from Base
#attributes, #context, #id, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ Image
constructor
A new instance of Image.
Methods included from Mixins::Tooltips
Methods included from Mixins::Event
Methods inherited from Base
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ Image
Returns a new instance of Image.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/voom/presenters/dsl/components/image.rb', line 13 def initialize(**attribs_, &block) super(type: :image, context: context, **attribs_, &block) @image = attribs.delete(:image) @height = attribs.delete(:height) @width = attribs.delete(:width) @position = Array(attribs.delete(:position)).compact @selected = attribs.delete(:selected) @url = build_url end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
11 12 13 |
# File 'lib/voom/presenters/dsl/components/image.rb', line 11 def height @height end |
#image ⇒ Object
Returns the value of attribute image.
11 12 13 |
# File 'lib/voom/presenters/dsl/components/image.rb', line 11 def image @image end |
#position ⇒ Object
Returns the value of attribute position.
11 12 13 |
# File 'lib/voom/presenters/dsl/components/image.rb', line 11 def position @position end |
#selected ⇒ Object
Returns the value of attribute selected.
11 12 13 |
# File 'lib/voom/presenters/dsl/components/image.rb', line 11 def selected @selected end |
#url ⇒ Object
Returns the value of attribute url.
11 12 13 |
# File 'lib/voom/presenters/dsl/components/image.rb', line 11 def url @url end |
#width ⇒ Object
Returns the value of attribute width.
11 12 13 |
# File 'lib/voom/presenters/dsl/components/image.rb', line 11 def width @width end |