Class: Yeti::Viewer
- Inherits:
-
Object
- Object
- Yeti::Viewer
- Defined in:
- lib/yeti/viewer.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#decorated ⇒ Object
readonly
Returns the value of attribute decorated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(context, decorated) ⇒ Viewer
constructor
A new instance of Viewer.
Constructor Details
#initialize(context, decorated) ⇒ Viewer
Returns a new instance of Viewer.
7 8 9 10 |
# File 'lib/yeti/viewer.rb', line 7 def initialize(context, decorated) @context = context @decorated = decorated end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/yeti/viewer.rb', line 4 def context @context end |
#decorated ⇒ Object (readonly)
Returns the value of attribute decorated.
4 5 6 |
# File 'lib/yeti/viewer.rb', line 4 def decorated @decorated end |
Class Method Details
.from_id(context, id) ⇒ Object
12 13 14 |
# File 'lib/yeti/viewer.rb', line 12 def self.from_id(context, id) new context, (find_by_id context, id if id) end |