Class: Fountain::Funnel

Inherits:
Object
  • Object
show all
Defined in:
lib/fountain/funnel.rb

Overview

Fountain Funnel

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Funnel

Returns a new instance of Funnel.

Parameters:

  • data (Hash)

    Raw funnel data



12
13
14
# File 'lib/fountain/funnel.rb', line 12

def initialize(data)
  @raw_data = Util.stringify_hash_keys data
end

Instance Attribute Details

#raw_dataObject (readonly)

Raw funnel data



7
8
9
# File 'lib/fountain/funnel.rb', line 7

def raw_data
  @raw_data
end

Instance Method Details

#custom_idObject

Custom ID



27
28
29
# File 'lib/fountain/funnel.rb', line 27

def custom_id
  raw_data['custom_id']
end

#idObject

Funnel ID



17
18
19
# File 'lib/fountain/funnel.rb', line 17

def id
  raw_data['id']
end

#inspectObject



31
32
33
34
35
36
37
38
39
# File 'lib/fountain/funnel.rb', line 31

def inspect
  format(
    '#<%<class_name>s:0x%<object_id>p @id="%<id>s" @title="%<title>s">',
    class_name: self.class.name,
    object_id: object_id,
    id: id,
    title: title
  )
end

#titleObject

Title



22
23
24
# File 'lib/fountain/funnel.rb', line 22

def title
  raw_data['title']
end