Class: Icss::Meta::License

Inherits:
Object show all
Includes:
ReceiverModel, ReceiverModel::ActsAsCatalog
Defined in:
lib/icss/protocol/license.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ReceiverModel::ActsAsCatalog

included, #register

Methods included from ReceiverModel

included, #tree_merge!

Methods included from ReceiverModel::ActsAsTuple

included, #to_tuple

Methods included from RecordModel

#attr_set?, included, #receive!, #to_zaml

Methods included from ReceiverModel::ActsAsLoadable

#merge_from_file!

Methods included from ReceiverModel::ActsAsHash

#[], #[]=, #attributes, #delete, included, #keys

Class Method Details

.catalog_sectionsObject



23
24
25
# File 'lib/icss/protocol/license.rb', line 23

def self.catalog_sections
  ['licenses']
end

Instance Method Details

#fullnameObject



14
15
16
# File 'lib/icss/protocol/license.rb', line 14

def fullname
  license_id
end

#nameObject Also known as: basename



18
19
20
# File 'lib/icss/protocol/license.rb', line 18

def name
  license_id.split('.').last
end

#to_hashObject



27
28
29
30
31
32
33
34
# File 'lib/icss/protocol/license.rb', line 27

def to_hash()
  { :license_id => license_id,
    :title => title,
    :url => url,
    :description => description,
    :summary => summary,
    :article_body => article_body }
end

#to_jsonObject



36
# File 'lib/icss/protocol/license.rb', line 36

def to_json() to_hash.to_json ; end