Class: Interage::Request::Builder

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/interage/request/builder.rb

Direct Known Subclasses

ApplicationBuilder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Builder

Returns a new instance of Builder.



10
11
12
13
14
# File 'lib/interage/request/builder.rb', line 10

def initialize(attributes = {})
  mount_errors(attributes.delete(:errors))

  super(assigned_attributes(attributes))
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



8
9
10
# File 'lib/interage/request/builder.rb', line 8

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/interage/request/builder.rb', line 8

def id
  @id
end

#updated_atObject

Returns the value of attribute updated_at.



8
9
10
# File 'lib/interage/request/builder.rb', line 8

def updated_at
  @updated_at
end

Instance Method Details

#persisted?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/interage/request/builder.rb', line 16

def persisted?
  id.present?
end