Class: HeyYou::Builder::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/hey_you/builder/_base.rb

Direct Known Subclasses

Email, Push

Defined Under Namespace

Classes: InterpolationError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, key, **options) ⇒ Base

Returns a new instance of Base.



6
7
8
9
10
11
# File 'lib/hey_you/builder/_base.rb', line 6

def initialize(data, key, **options)
  @data = data
  @key = key
  @options = options
  build
end

Instance Attribute Details

#dataObject (readonly) Also known as: ch_data

Returns the value of attribute data.



4
5
6
# File 'lib/hey_you/builder/_base.rb', line 4

def data
  @data
end

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/hey_you/builder/_base.rb', line 4

def key
  @key
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/hey_you/builder/_base.rb', line 4

def options
  @options
end

Instance Method Details

#to_hashObject Also known as: to_h

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/hey_you/builder/_base.rb', line 13

def to_hash
  raise NotImplementedError, 'Builder not implemented #to_hash method'
end