Class: Signable::List

Inherits:
Struct
  • Object
show all
Defined in:
lib/signable/list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#data_typeObject

Returns the value of attribute data_type

Returns:

  • (Object)

    the current value of data_type



2
3
4
# File 'lib/signable/list.rb', line 2

def data_type
  @data_type
end

#hashObject

Returns the value of attribute hash

Returns:

  • (Object)

    the current value of hash



2
3
4
# File 'lib/signable/list.rb', line 2

def hash
  @hash
end

Instance Method Details

#dataObject



16
17
18
# File 'lib/signable/list.rb', line 16

def data
  @data ||= hash[data_name].map { |attributes| data_type.new attributes }
end

#limitObject



8
9
10
# File 'lib/signable/list.rb', line 8

def limit
  hash['limit']
end

#offsetObject



4
5
6
# File 'lib/signable/list.rb', line 4

def offset
  hash['offset']
end

#totalObject



12
13
14
# File 'lib/signable/list.rb', line 12

def total
  hash["total_#{data_name}"]
end