Class: NPR::Entity::Crop
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#src ⇒ Object
Returns the value of attribute src.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(json) ⇒ Crop
constructor
—————.
Methods included from Concern::ShallowAttributes
Methods included from Concern::Relation
Constructor Details
#initialize(json) ⇒ Crop
11 12 13 14 15 16 |
# File 'lib/npr/entity/crop.rb', line 11 def initialize(json) @type = json["type"] @src = json["src"] @width = json["width"].to_i @height = json["height"].to_i end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
7 8 9 |
# File 'lib/npr/entity/crop.rb', line 7 def height @height end |
#src ⇒ Object
Returns the value of attribute src.
7 8 9 |
# File 'lib/npr/entity/crop.rb', line 7 def src @src end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/npr/entity/crop.rb', line 7 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
7 8 9 |
# File 'lib/npr/entity/crop.rb', line 7 def width @width end |