Class: Cwsrb::Language

Inherits:
Object
  • Object
show all
Defined in:
lib/cwsrb/data.rb

Defined Under Namespace

Classes: Status, Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code: nil, name: nil, native_name: nil, ipa: nil, type: nil, owners: [], overview: '', public: true, status: '', registered: Time.now, word_count: 0) ⇒ Language

Returns a new instance of Language.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/cwsrb/data.rb', line 87

def initialize(code: nil, name: nil, native_name: nil, ipa: nil, type: nil,
               owners: [], overview: '', public: true, status: '',
               registered: Time.now, word_count: 0)
  @code = code
  @name = name
  @native_name = native_name
  @ipa = ipa
  @type = type
  @owners = owners
  @overview = overview
  @public = public
  @status = status
  @registered = registered
  @word_count = word_count
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



75
76
77
# File 'lib/cwsrb/data.rb', line 75

def code
  @code
end

#ipaObject (readonly)

Returns the value of attribute ipa.



78
79
80
# File 'lib/cwsrb/data.rb', line 78

def ipa
  @ipa
end

#nameObject (readonly)

Returns the value of attribute name.



76
77
78
# File 'lib/cwsrb/data.rb', line 76

def name
  @name
end

#native_nameObject (readonly)

Returns the value of attribute native_name.



77
78
79
# File 'lib/cwsrb/data.rb', line 77

def native_name
  @native_name
end

#overviewObject (readonly)

Returns the value of attribute overview.



81
82
83
# File 'lib/cwsrb/data.rb', line 81

def overview
  @overview
end

#ownersObject (readonly)

Returns the value of attribute owners.



80
81
82
# File 'lib/cwsrb/data.rb', line 80

def owners
  @owners
end

#publicObject (readonly)

Returns the value of attribute public.



82
83
84
# File 'lib/cwsrb/data.rb', line 82

def public
  @public
end

#registeredObject (readonly)

Returns the value of attribute registered.



84
85
86
# File 'lib/cwsrb/data.rb', line 84

def registered
  @registered
end

#statusObject (readonly)

Returns the value of attribute status.



83
84
85
# File 'lib/cwsrb/data.rb', line 83

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



79
80
81
# File 'lib/cwsrb/data.rb', line 79

def type
  @type
end

#word_countObject (readonly)

Returns the value of attribute word_count.



85
86
87
# File 'lib/cwsrb/data.rb', line 85

def word_count
  @word_count
end

Instance Method Details

#inspectObject



103
104
105
106
107
108
# File 'lib/cwsrb/data.rb', line 103

def inspect
  "<Language code=#{@code} name=#{@name} native_name=#{@native_name} " \
    "ipa=#{@ipa} type=#{@type} owners=#{@owners} overview=#{@overview} " \
    "public=#{@public} status=#{@status} registered=#{@registered} " \
    "word_count=#{@word_count}>"
end