Class: Order

Inherits:
Object
  • Object
show all
Includes:
RubyExt::OpenConstructor
Defined in:
app/models/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Order

Returns a new instance of Order.



9
10
11
12
# File 'app/models/order.rb', line 9

def initialize options = {}
  super
  set! options
end

Instance Attribute Details

#detailsObject

Returns the value of attribute details.



16
17
18
# File 'app/models/order.rb', line 16

def details
  @details
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'app/models/order.rb', line 14

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



15
16
17
# File 'app/models/order.rb', line 15

def phone
  @phone
end

Instance Method Details

#valid?(options = {}) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'app/models/order.rb', line 5

def valid? options = {}
  run_model_validations && errors.empty?
end