Class: XCAssets::Image
- Inherits:
-
Object
- Object
- XCAssets::Image
- Defined in:
- lib/KCommercialPipeline/core/resource/xcassets/image.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#idiom ⇒ Object
Returns the value of attribute idiom.
-
#resource ⇒ Pathname
The resource path.
-
#scale ⇒ Object
Returns the value of attribute scale.
Instance Method Summary collapse
- #contents ⇒ Object
-
#initialize ⇒ Image
constructor
A new instance of Image.
Constructor Details
#initialize ⇒ Image
Returns a new instance of Image.
11 12 13 14 15 |
# File 'lib/KCommercialPipeline/core/resource/xcassets/image.rb', line 11 def initialize @idiom = 'universal' @scale = "2x" @resource = nil end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
9 10 11 |
# File 'lib/KCommercialPipeline/core/resource/xcassets/image.rb', line 9 def filename @filename end |
#idiom ⇒ Object
Returns the value of attribute idiom.
3 4 5 |
# File 'lib/KCommercialPipeline/core/resource/xcassets/image.rb', line 3 def idiom @idiom end |
#resource ⇒ Pathname
The resource path
7 8 9 |
# File 'lib/KCommercialPipeline/core/resource/xcassets/image.rb', line 7 def resource @resource end |
#scale ⇒ Object
Returns the value of attribute scale.
4 5 6 |
# File 'lib/KCommercialPipeline/core/resource/xcassets/image.rb', line 4 def scale @scale end |
Instance Method Details
#contents ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/KCommercialPipeline/core/resource/xcassets/image.rb', line 22 def contents hash = {} hash[:idiom] = idiom if idiom hash[:scale] = scale if scale hash[:filename] = filename if filename hash end |