Class: Trocla::Formats::Base
- Inherits:
-
Object
- Object
- Trocla::Formats::Base
- Defined in:
- lib/trocla/formats.rb
Overview
Base
Direct Known Subclasses
Bcrypt, Md5crypt, Mysql, Pgsql, Plain, Sha1, Sha256crypt, Sha512crypt, Ssha, Sshkey, Wireguard, X509
Instance Attribute Summary collapse
-
#trocla ⇒ Object
readonly
Returns the value of attribute trocla.
Class Method Summary collapse
Instance Method Summary collapse
- #expensive? ⇒ Boolean
-
#initialize(trocla) ⇒ Base
constructor
A new instance of Base.
- #render(output, render_options = {}) ⇒ Object
Constructor Details
#initialize(trocla) ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/trocla/formats.rb', line 9 def initialize(trocla) @trocla = trocla end |
Instance Attribute Details
#trocla ⇒ Object (readonly)
Returns the value of attribute trocla.
7 8 9 |
# File 'lib/trocla/formats.rb', line 7 def trocla @trocla end |
Class Method Details
.expensive(is_expensive) ⇒ Object
21 22 23 |
# File 'lib/trocla/formats.rb', line 21 def expensive(is_expensive) @expensive = is_expensive end |
.expensive? ⇒ Boolean
25 26 27 |
# File 'lib/trocla/formats.rb', line 25 def expensive? @expensive == true end |
Instance Method Details
#expensive? ⇒ Boolean
17 18 19 |
# File 'lib/trocla/formats.rb', line 17 def expensive? self.class.expensive? end |
#render(output, render_options = {}) ⇒ Object
13 14 15 |
# File 'lib/trocla/formats.rb', line 13 def render(output, = {}) output end |