Class: AsciiBinderGabrielRH::Site

Inherits:
Object
  • Object
show all
Defined in:
lib/ascii_binder_gabriel_rh/site.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(distro_config) ⇒ Site

Returns a new instance of Site.



9
10
11
12
13
# File 'lib/ascii_binder_gabriel_rh/site.rb', line 9

def initialize(distro_config)
  @id   = distro_config['site']
  @name = distro_config['site_name']
  @url  = distro_config['site_url']
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/ascii_binder_gabriel_rh/site.rb', line 7

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/ascii_binder_gabriel_rh/site.rb', line 7

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/ascii_binder_gabriel_rh/site.rb', line 7

def url
  @url
end

Instance Method Details

#errorsObject



19
20
21
# File 'lib/ascii_binder_gabriel_rh/site.rb', line 19

def errors
  validate(true)
end

#is_valid?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/ascii_binder_gabriel_rh/site.rb', line 15

def is_valid?
  validate
end