Class: ExpressMailer::Button

Inherits:
Object
  • Object
show all
Defined in:
lib/express_mailer/button.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Button

Returns a new instance of Button.



13
14
15
16
# File 'lib/express_mailer/button.rb', line 13

def initialize(options = {})
  @text = options.fetch(:text)
  @href = options.fetch(:href)
end

Instance Attribute Details

#href ⇒ Object

Returns the value of attribute href.



3
4
5
# File 'lib/express_mailer/button.rb', line 3

def href
  @href
end

#text ⇒ Object

Returns the value of attribute text.



3
4
5
# File 'lib/express_mailer/button.rb', line 3

def text
  @text
end

Class Method Details

.create(options) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/express_mailer/button.rb', line 5

def self.create(options)
  if options
    new(options)
  else
    nil
  end
end