Class: Guilded::ComponentDef
- Inherits:
-
Object
- Object
- Guilded::ComponentDef
- Defined in:
- lib/guilded/component_def.rb
Instance Attribute Summary collapse
-
#additional_js ⇒ Object
Returns the value of attribute additional_js.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#libs ⇒ Object
readonly
Returns the value of attribute libs.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#styles ⇒ Object
readonly
Returns the value of attribute styles.
Instance Method Summary collapse
- #exclude_css? ⇒ Boolean
- #exclude_js? ⇒ Boolean
-
#initialize(kind, options = {}, libs = [], styles = [], additional_js = '') ⇒ ComponentDef
constructor
A new instance of ComponentDef.
Constructor Details
#initialize(kind, options = {}, libs = [], styles = [], additional_js = '') ⇒ ComponentDef
Returns a new instance of ComponentDef.
7 8 9 10 11 12 13 |
# File 'lib/guilded/component_def.rb', line 7 def initialize( kind, ={}, libs=[], styles=[], additional_js='' ) @kind = kind @options = @libs = libs @styles = styles @additional_js = additional_js end |
Instance Attribute Details
#additional_js ⇒ Object
Returns the value of attribute additional_js.
5 6 7 |
# File 'lib/guilded/component_def.rb', line 5 def additional_js @additional_js end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
4 5 6 |
# File 'lib/guilded/component_def.rb', line 4 def kind @kind end |
#libs ⇒ Object (readonly)
Returns the value of attribute libs.
4 5 6 |
# File 'lib/guilded/component_def.rb', line 4 def libs @libs end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/guilded/component_def.rb', line 4 def @options end |
#styles ⇒ Object (readonly)
Returns the value of attribute styles.
4 5 6 |
# File 'lib/guilded/component_def.rb', line 4 def styles @styles end |
Instance Method Details
#exclude_css? ⇒ Boolean
15 16 17 |
# File 'lib/guilded/component_def.rb', line 15 def exclude_css? .include?( :exclude_css ) && ( [:exclude_css] == 'true' || [:exclude_css] == true ) end |
#exclude_js? ⇒ Boolean
19 20 21 |
# File 'lib/guilded/component_def.rb', line 19 def exclude_js? .include?( :exclude_js ) && ( [:exclude_js] == 'true' || [:exclude_js] == true ) end |