Class: Moblues::DataModel::Attribute

Inherits:
Struct
  • Object
show all
Defined in:
lib/moblues/data_model/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Attribute

Returns a new instance of Attribute.



6
7
8
9
10
11
12
# File 'lib/moblues/data_model/attribute.rb', line 6

def initialize(params)
  p = params.compact
  super(
    p.fetch(:name),
    p.fetch(:type)
  )
end

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/moblues/data_model/attribute.rb', line 5

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



5
6
7
# File 'lib/moblues/data_model/attribute.rb', line 5

def type
  @type
end