Class: Hylite::Hyliter
- Inherits:
-
Object
- Object
- Hylite::Hyliter
- Defined in:
- lib/hylite/hyliters.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code, lang) ⇒ Hyliter
constructor
A new instance of Hyliter.
- #type ⇒ Object
Constructor Details
#initialize(code, lang) ⇒ Hyliter
Returns a new instance of Hyliter.
16 17 18 |
# File 'lib/hylite/hyliters.rb', line 16 def initialize(code, lang) @code, @lang = code, lang end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
14 15 16 |
# File 'lib/hylite/hyliters.rb', line 14 def code @code end |
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
14 15 16 |
# File 'lib/hylite/hyliters.rb', line 14 def lang @lang end |
Class Method Details
.available? ⇒ Boolean
10 11 12 |
# File 'lib/hylite/hyliters.rb', line 10 def self.available? raise NotImplementedError, 'Subclass should define' end |
.new?(code, lang) ⇒ Boolean
5 6 7 8 |
# File 'lib/hylite/hyliters.rb', line 5 def self.new?(code, lang) return nil unless available? new code, lang end |
Instance Method Details
#type ⇒ Object
20 21 22 |
# File 'lib/hylite/hyliters.rb', line 20 def type raise NotImplementedError, 'Subclass should define' end |