Class: Belpost::Models::Parcel
- Inherits:
-
Object
- Object
- Belpost::Models::Parcel
- Defined in:
- lib/belpost/models/parcel.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Parcel
constructor
A new instance of Parcel.
- #to_h ⇒ Object
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(data) ⇒ Parcel
Returns a new instance of Parcel.
8 9 10 |
# File 'lib/belpost/models/parcel.rb', line 8 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/belpost/models/parcel.rb', line 6 def data @data end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/belpost/models/parcel.rb', line 12 def to_h data end |
#to_json(*_args) ⇒ Object
16 17 18 |
# File 'lib/belpost/models/parcel.rb', line 16 def to_json(*_args) data.to_json end |