Class: Icss::Meta::Source
Class Method Summary
collapse
Instance Method Summary
collapse
included, #register
included, #tree_merge!
included, #to_tuple
#attr_set?, included, #receive!, #to_zaml
#merge_from_file!
#[], #[]=, #attributes, #delete, included, #keys
Class Method Details
.catalog_sections ⇒ Object
21
22
23
|
# File 'lib/icss/protocol/source.rb', line 21
def self.catalog_sections
['sources']
end
|
Instance Method Details
12
13
14
|
# File 'lib/icss/protocol/source.rb', line 12
def fullname
source_id
end
|
#name ⇒ Object
Also known as:
basename
16
17
18
|
# File 'lib/icss/protocol/source.rb', line 16
def name
source_id.split('.').last
end
|
25
26
27
28
29
30
|
# File 'lib/icss/protocol/source.rb', line 25
def to_hash()
{ :source_id => source_id,
:title => title,
:description => description,
:url => url }
end
|
32
|
# File 'lib/icss/protocol/source.rb', line 32
def to_json() to_hash.to_json ; end
|