Class: GoodData::Model::TabBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/gooddata/models/tab_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(title) ⇒ TabBuilder

Returns a new instance of TabBuilder.



10
11
12
13
# File 'lib/gooddata/models/tab_builder.rb', line 10

def initialize(title)
  @title = title
  @stuff = []
end

Instance Method Details

#add_report(options = {}) ⇒ Object



15
16
17
# File 'lib/gooddata/models/tab_builder.rb', line 15

def add_report(options = {})
  @stuff << { :type => :report }.merge(options)
end

#to_hashObject



19
20
21
22
23
24
# File 'lib/gooddata/models/tab_builder.rb', line 19

def to_hash
  {
    :title => @title,
    :items => @stuff
  }
end