Class: Signable::List
- Inherits:
-
Struct
- Object
- Struct
- Signable::List
- Defined in:
- lib/signable/list.rb
Instance Attribute Summary collapse
-
#data_type ⇒ Object
Returns the value of attribute data_type.
-
#hash ⇒ Object
Returns the value of attribute hash.
Instance Method Summary collapse
Instance Attribute Details
#data_type ⇒ Object
Returns the value of attribute data_type
2 3 4 |
# File 'lib/signable/list.rb', line 2 def data_type @data_type end |
#hash ⇒ Object
Returns the value of attribute hash
2 3 4 |
# File 'lib/signable/list.rb', line 2 def hash @hash end |
Instance Method Details
#data ⇒ Object
16 17 18 |
# File 'lib/signable/list.rb', line 16 def data @data ||= hash[data_name].map { |attributes| data_type.new attributes } end |
#limit ⇒ Object
8 9 10 |
# File 'lib/signable/list.rb', line 8 def limit hash['limit'] end |
#offset ⇒ Object
4 5 6 |
# File 'lib/signable/list.rb', line 4 def offset hash['offset'] end |
#total ⇒ Object
12 13 14 |
# File 'lib/signable/list.rb', line 12 def total hash["total_#{data_name}"] end |