Class: Runcom::Context
- Inherits:
-
Struct
- Object
- Struct
- Runcom::Context
- Defined in:
- lib/runcom/context.rb
Overview
A common context for all XDG custom objects.
Instance Attribute Summary collapse
-
#defaults ⇒ Object
Returns the value of attribute defaults.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#home ⇒ Object
Returns the value of attribute home.
-
#xdg ⇒ Object
Returns the value of attribute xdg.
Instance Method Summary collapse
-
#initialize(*arguments) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(*arguments) ⇒ Context
Returns a new instance of Context.
6 7 8 9 10 11 12 |
# File 'lib/runcom/context.rb', line 6 def initialize *arguments super self[:home] ||= Paths::Home self[:environment] ||= ENV self[:xdg] = xdg.new home: home, environment: environment if xdg end |
Instance Attribute Details
#defaults ⇒ Object
Returns the value of attribute defaults
5 6 7 |
# File 'lib/runcom/context.rb', line 5 def defaults @defaults end |
#environment ⇒ Object
Returns the value of attribute environment
5 6 7 |
# File 'lib/runcom/context.rb', line 5 def environment @environment end |
#home ⇒ Object
Returns the value of attribute home
5 6 7 |
# File 'lib/runcom/context.rb', line 5 def home @home end |
#xdg ⇒ Object
Returns the value of attribute xdg
5 6 7 |
# File 'lib/runcom/context.rb', line 5 def xdg @xdg end |