Class: EasyMailPreview::Mailer::Method::Argument

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

Instance Method Summary collapse

Constructor Details

#initialize(tuple) ⇒ Argument

Returns a new instance of Argument.



45
46
47
# File 'lib/easy_mail_preview.rb', line 45

def initialize(tuple)
  @tuple = tuple
end

Instance Method Details

#nameObject



49
50
51
# File 'lib/easy_mail_preview.rb', line 49

def name
  @tuple.last
end

#required?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/easy_mail_preview.rb', line 53

def required?
  @tuple.first == :req
end