Class: Address

Inherits:
Object
  • Object
show all
Defined in:
lib/vendored-middleman-deps/padrino-helpers-0.11.2/test/fixtures/markup_app/app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, existing) ⇒ Address

Returns a new instance of Address.



68
# File 'lib/vendored-middleman-deps/padrino-helpers-0.11.2/test/fixtures/markup_app/app.rb', line 68

def initialize(name, existing); @name, @existing = name, existing; end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



67
68
69
# File 'lib/vendored-middleman-deps/padrino-helpers-0.11.2/test/fixtures/markup_app/app.rb', line 67

def name
  @name
end

Instance Method Details

#idObject



70
# File 'lib/vendored-middleman-deps/padrino-helpers-0.11.2/test/fixtures/markup_app/app.rb', line 70

def id; @existing ? 25 : nil; end

#new_record?Boolean

Returns:

  • (Boolean)


69
# File 'lib/vendored-middleman-deps/padrino-helpers-0.11.2/test/fixtures/markup_app/app.rb', line 69

def new_record?; !@existing; end