Class: LocastyleComponents::Tags::Collapse

Inherits:
Base
  • Object
show all
Defined in:
lib/locastyle_components/tags/collapse.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view, block, options) ⇒ Collapse

Returns a new instance of Collapse.



10
11
12
13
14
15
# File 'lib/locastyle_components/tags/collapse.rb', line 10

def initialize(view, block, options)
  @view = view
  @options = Hash(options)
  @id = Time.now.to_f.to_s.gsub(/\D/, '')
  @block = block
end

Instance Attribute Details

#blockObject

Returns the value of attribute block.



8
9
10
# File 'lib/locastyle_components/tags/collapse.rb', line 8

def block
  @block
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/locastyle_components/tags/collapse.rb', line 8

def id
  @id
end

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/locastyle_components/tags/collapse.rb', line 8

def options
  @options
end

#viewObject

Returns the value of attribute view.



8
9
10
# File 'lib/locastyle_components/tags/collapse.rb', line 8

def view
  @view
end

Instance Method Details

#buildObject



17
18
19
20
21
# File 'lib/locastyle_components/tags/collapse.rb', line 17

def build
  base do
    header + body
  end
end