Class: EpubForge::Builder::Assets::Stylesheet
- Defined in:
- lib/epubforge/builder/assets/stylesheet.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Stylesheet
constructor
A new instance of Stylesheet.
- #item_id ⇒ Object
- #link ⇒ Object
- #media_type ⇒ Object
Methods inherited from Asset
Constructor Details
#initialize(filename) ⇒ Stylesheet
Returns a new instance of Stylesheet.
6 7 8 9 10 |
# File 'lib/epubforge/builder/assets/stylesheet.rb', line 6 def initialize( filename ) @filename = filename.fwf_filepath @name = @filename.basename @contents = @filename.read end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
5 6 7 |
# File 'lib/epubforge/builder/assets/stylesheet.rb', line 5 def contents @contents end |
#filename ⇒ Object
Returns the value of attribute filename.
5 6 7 |
# File 'lib/epubforge/builder/assets/stylesheet.rb', line 5 def filename @filename end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/epubforge/builder/assets/stylesheet.rb', line 5 def name @name end |
Instance Method Details
#item_id ⇒ Object
16 17 18 |
# File 'lib/epubforge/builder/assets/stylesheet.rb', line 16 def item_id @name end |
#link ⇒ Object
12 13 14 |
# File 'lib/epubforge/builder/assets/stylesheet.rb', line 12 def link STYLE_DIR.join( @name ) end |
#media_type ⇒ Object
20 21 22 |
# File 'lib/epubforge/builder/assets/stylesheet.rb', line 20 def media_type MEDIA_TYPES["css"] end |