Class: Bs5::PopoverService

Inherits:
Object
  • Object
show all
Defined in:
app/service/bs5/popover_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PopoverService

Returns a new instance of PopoverService.



9
10
11
12
# File 'app/service/bs5/popover_service.rb', line 9

def initialize(options = {})
  @title = options.delete(:title)
  @options = options
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



7
8
9
# File 'app/service/bs5/popover_service.rb', line 7

def title
  @title
end

Instance Method Details

#to_hashObject



14
15
16
17
18
19
# File 'app/service/bs5/popover_service.rb', line 14

def to_hash
  {
    title: title,
    data: options
  }.compact
end