Class: Rack::DevMark::Theme::Base
- Inherits:
-
Object
- Object
- Rack::DevMark::Theme::Base
- Defined in:
- lib/rack/dev-mark/theme/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Base
constructor
A new instance of Base.
- #insert_into(html) ⇒ Object
- #setup(env, revision) ⇒ Object
- #stylesheet_link_tag(path) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/rack/dev-mark/theme/base.rb', line 7 def initialize(*args) raise RuntimeError, 'Abstract class can not be instantiated' if self.class == Rack::DevMark::Theme::Base end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
5 6 7 |
# File 'lib/rack/dev-mark/theme/base.rb', line 5 def env @env end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
5 6 7 |
# File 'lib/rack/dev-mark/theme/base.rb', line 5 def revision @revision end |
Instance Method Details
#insert_into(html) ⇒ Object
16 17 18 |
# File 'lib/rack/dev-mark/theme/base.rb', line 16 def insert_into(html) end |
#setup(env, revision) ⇒ Object
11 12 13 14 |
# File 'lib/rack/dev-mark/theme/base.rb', line 11 def setup(env, revision) @env = env @revision = revision end |
#stylesheet_link_tag(path) ⇒ Object
20 21 22 |
# File 'lib/rack/dev-mark/theme/base.rb', line 20 def stylesheet_link_tag(path) %Q~<style>#{::File.open(::File.join(::File.dirname(__FILE__), '../../../../vendor/assets/stylesheets', path)).read}</style>~ end |