class Fountain::Funnel
Attributes
raw_data[R]
Raw funnel data
Public Class Methods
new(data)
click to toggle source
@param [Hash] data Raw funnel data
# File lib/fountain/funnel.rb, line 14 def initialize(data) @raw_data = Util.stringify_hash_keys data end
Public Instance Methods
active?()
click to toggle source
Active
# File lib/fountain/funnel.rb, line 73 def active? raw_data['active'] end
address()
click to toggle source
Address
# File lib/fountain/funnel.rb, line 34 def address raw_data['address'] end
custom_id()
click to toggle source
Custom ID
# File lib/fountain/funnel.rb, line 29 def custom_id raw_data['custom_id'] end
description()
click to toggle source
Description
# File lib/fountain/funnel.rb, line 44 def description raw_data['description'] end
fields()
click to toggle source
Fields
# File lib/fountain/funnel.rb, line 54 def fields return [] unless raw_data['fields'].is_a? Array raw_data['fields'].map { |hash| Field.new hash } end
id()
click to toggle source
Funnel
ID
# File lib/fountain/funnel.rb, line 19 def id raw_data['id'] end
inspect()
click to toggle source
# File lib/fountain/funnel.rb, line 84 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
location()
click to toggle source
# File lib/fountain/funnel.rb, line 78 def location return unless raw_data['location'].is_a? Hash Location.new raw_data['location'] end
private?()
click to toggle source
Private
# File lib/fountain/funnel.rb, line 68 def private? raw_data['is_private'] end
requirements()
click to toggle source
Requirements
# File lib/fountain/funnel.rb, line 49 def requirements raw_data['requirements'] end
stages()
click to toggle source
Stages
# File lib/fountain/funnel.rb, line 61 def stages return [] unless raw_data['stages'].is_a? Array raw_data['stages'].map { |hash| Stage.new hash } end
time_zone()
click to toggle source
Time zone
# File lib/fountain/funnel.rb, line 39 def time_zone raw_data['time_zone'] end
title()
click to toggle source
Title
# File lib/fountain/funnel.rb, line 24 def title raw_data['title'] end