Class: EasyCaddy::Site
- Inherits:
-
Data
- Object
- Data
- EasyCaddy::Site
- Defined in:
- lib/easy_caddy/site.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled
4 5 6 |
# File 'lib/easy_caddy/site.rb', line 4 def enabled @enabled end |
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/easy_caddy/site.rb', line 4 def name @name end |
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path
4 5 6 |
# File 'lib/easy_caddy/site.rb', line 4 def source_path @source_path end |
Class Method Details
.from_h(h) ⇒ Object
5 6 7 |
# File 'lib/easy_caddy/site.rb', line 5 def self.from_h(h) new(name: h['name'], enabled: h.fetch('enabled', true), source_path: h['source_path']) end |
Instance Method Details
#to_h ⇒ Object
9 10 11 |
# File 'lib/easy_caddy/site.rb', line 9 def to_h { 'name' => name, 'enabled' => enabled, 'source_path' => source_path } end |